/**@Title   HelloWorld.java
 * @Package com.gong
 * @Desc    
 * @Author  GongWenhua
 * @Date    2017年6月27日 下午5:09:54
 * @Version 1.0
*/
package com.gong;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldControl {
	
	@Value("${test.name}")
	private String name;
	
	@Value("${test.age}")
	private int age;
	
	@Autowired
	private UserConfig config;
	
	@RequestMapping("/hello")
	public String hello() {
		System.out.println("name="+config.getName()+". "+"age="+config.getAge());
		return "Hello World";
	}
}
